<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>广告添加</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<form class="form-horizontal" method="post" action="create" enctype="multipart/form-data">
    <div class="form-group">
        <label for="inputEmail3" class="col-sm-2 control-label">广告位置</label>
        <div class="col-sm-10">
            <select class="form-control location" name="location" >
                <option>电脑PC版-首页焦点图(750*420)</option>
                <option>电脑PC版-首页焦点图(750*420)</option>
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="exampleInputFile" class="col-sm-2 control-label">广告图片</label>
        <div class="col-sm-10">

            <input type="file" id="img" name="img">
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">广告链接</label>
        <div class="col-sm-10">
            <input type="password" class="form-control link" id="inputPassword3" name="link">
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">广告状态</label>
        <div class="col-sm-offset-2 col-sm-10">
                    <input type="radio" checked name="status" value="1" class="status"> 显示
                    <input type="radio" name="status" value="2"> 隐藏
        </div>
    </div>
    <div class="form-group">
        <label for="inputPassword3" class="col-sm-2 control-label">显示顺序</label>
        <div class="col-sm-2">
            <input type="password" class="form-control sort" id="" name="sort">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-danger">提交</button>
        </div>
    </div>
</form>
</body>
<script src="/static/js/jquery-3.1.1.min.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script>
    $().ready(function() {
// 在键盘按下并释放及提交后验证提交表单
        $("#signupForm").validate({
            rules: {
                link: "required",
            },
            messages: {
                link: "请输入链接",
            }
        })
    });
</script>
</html>